package com.song.shop.controller;

import org.elasticsearch.index.query.QueryBuilders;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.elasticsearch.core.ElasticsearchTemplate;
import org.springframework.data.elasticsearch.core.query.NativeSearchQuery;
import org.springframework.data.elasticsearch.core.query.SearchQuery;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by IntelliJ IDEA.
 *
 * @author: Song Yinhui
 * @Date: 2018/12/10 16:04
 */

@RestController
public class ElasticSearchController {

    @Autowired
    private ElasticsearchTemplate elasticsearchTemplate ;

    @RequestMapping(value = "elsearch")
    public Object test(){
        SearchQuery query = new NativeSearchQuery(QueryBuilders.boolQuery());
        return null;
    }
}
